<div id="tasksBlock">
    <div style="padding-bottom: 10px;"></div>

    <?php if (is_array($this->info)) {
    ?>
    <?php
        echo $this->paginationControl($this->paginator, 'Sliding', "paginator_control_en.phtml", array(
            'onPage' => $this->onPage,
            'trans' => $this->trans,
            'countRow' => $this->countRow));
    ?>
        <div class="height12">&nbsp;</div>
        <table class="info-table">

        <?php echo $this->render('table_header.phtml') ?>

        <?php foreach ($this->info as $item) {
        ?>
            <tr class="line1">
            <?php
            foreach ($this->tableColumn as $tb_column) {
                $it = '';
            ?>
            <?php
                if ($tb_column['title'] == 'active') {
                    $it = '<div style="text-align: center">' . GetSnippets::getYN($item['active']) . '</div>';
                } elseif ($tb_column['title'] == 'Change') {
                    $it = '<div class="action_block" style="text-align: center">';
                    $it .= '<a target="_blank" href="' . Application_Model_Adv::getAdvHashUrl($item['id'], '/edit/') . '"><img src="/img/icon_edit.gif" alt="edit" title="edit" /></a>';
                    if (!empty($item['active'])) {
                        $it .= '<a class="p-left4" href="javascript: void(0)" onclick="globalModule.deleteRow(\'' . $item['id'] . '\')"><img src="/img/icon_del.gif" alt="remove" title="remove" /></a>';
                    } else {
                        $it .= '<a class="p-left4" href="javascript: void(0)" onclick="globalModule.activateRow(\'' . $item['id'] . '\')"><img src="/img/on.png" alt="activate" title="activate" /></a>';
                    }
                    $it .= '</div>';
                } elseif (gettype($item[$tb_column['title']]) != 'object') {
                    if (is_numeric($item[$tb_column['title']])) {
                        $it = '<div style="text-align: center">' . $item[$tb_column['title']] . '</div>';
                    } else {
                        $it = (string) $item[$tb_column['title']];
                    }
                } else {
                    $it = date_format($item[$tb_column['title']], 'Y-m-d H:i');
                }
            ?>
                <td <?php echo (empty($item['active'])) ? 'style="background-color: #EAD4C4"' : '' ?>>
                <?php
                if (isset($tb_column['wrap'])) {
                    switch ($tb_column['wrap']) {
                        case 'div150':
                            echo '<div style="width: 150px; max-height: 100px; overflow: auto;">' . $it . '</div>';
                            break;
                        case 'div200':
                            echo '<div style="width: 200px; max-height: 100px; overflow: auto;">' . $it . '</div>';
                            break;
                        default:
                            echo $it;
                            break;
                    }
                } else {
                    echo $it;
                }
                ?>
                </td>
        <?php } ?>
            </tr>
<?php } ?>
        <tr class="bottom-line">
            <td colspan="<?php echo count($this->tableColumn) ?>"></td>
        </tr>
    </table>
    <?php
        echo $this->paginationControl($this->paginator, 'Sliding', "paginator_control_en.phtml", array(
            'onPage' => $this->onPage,
            'trans' => $this->trans,
            'countRow' => $this->countRow));
    ?>

    <?php
    } else {
    ?>
        <div><?php echo $this->trans->_('rows_no_found'); ?></div>
<?php }
    echo GetSnippets::addJsVar(); ?>
</div>